{extend name="base/common"}

{block name="style"}
<link href="/static/summernote/summernote.css" rel="stylesheet">
<link href="/static/bootstrap-fileinput/css/fileinput.min.css" rel="stylesheet">
<link href="/static/js/jQuery-imgBox/imgbox.css" rel="stylesheet"/>
<style type="text/css">
    .note-editor.note-frame { border-radius: 0; border:0; margin-bottom: 0; }
    .front_cover_img {height: 40px; width: 40px; margin-top: 4px}
    .send_type_label {
        padding-left: 12px;
    }
</style>
{/block}

{block name="page-header"}

{/block}

{block name="main"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="mail-box-header">
            <div class="pull-right tooltip-demo">
                <!--<button url="{:Url('draft')}" class="btn btn-white btn-sm ajax-post" data-toggle="tooltip" data-placement="top"-->
                <!--target-form="form-horizontal" data-edit="content">-->
                <!--<i class="fa fa-pencil"></i> 保存草稿-->
                <!--</button>-->
                <a href="{:Url('index')}" class="btn btn-white btn-sm" data-toggle="tooltip" data-placement="top"><i class="fa fa-times"></i> 关闭</a>
            </div>
            {notpresent name="$list.id"}
            <h2>添加应用</h2>　
            {/notpresent}
            {present name="$list.type"}
            <h2>修改应用</h2>
            {/present}
        </div>
        <div class="mail-box">
            <form class="form-horizontal" method="post">
                <div class="mail-body">
                    <div class="form-group"><label class="col-sm-2 control-label">应用名称:</label>
                        {empty name="list.name"}
                        <div class="col-sm-10"><input type="text" class="form-control" placeholder="应用的名称" name="name" value= ''></div>
                        {/empty}
                        {notempty name="list.name"}
                        <div class="col-sm-10"><input type="text" class="form-control" placeholder="应用的名称" name="name" value='{$list.name}'></div>
                        {/notempty}
                    </div>



                    <div class="form-group"><label class="col-sm-2 control-label">图片:</label>
                        {empty name="list.img"}
                        <div class="col-sm-10"><input type="text" class="form-control" placeholder="应用的图片" name="img" value=""></div>
                        {/empty}
                        {notempty name="list.img"}
                        <div class="col-sm-10"><input type="text" class="form-control" placeholder="应用的图片" name="img" value="{$list.img}"></div>
                        {/notempty}
                    </div>

                    <div class="form-group"><label class="col-sm-2 control-label">地址:</label>
                        {empty name="list.path"}
                        <div class="col-sm-10"><input type="text" class="form-control" placeholder="应用的地址" name="path" value=""></div>
                        {/empty}
                        {notempty name="list.path"}
                        <div class="col-sm-10"><input type="text" class="form-control" placeholder="应用的地址" name="path" value="{$list.path}"></div>
                        {/notempty}
                    </div>


                    <div class="form-group"><label class="col-sm-2 control-label">所属园区:</label>
                        <div class="col-sm-10">
                            <label class="checkbox-inline i-checks">
                                {volist name="check" id="check"}
                                {notpresent name="check.park_id"}
                                {$check.name}&nbsp;<input style="margin-left:0" type="checkbox" value="{$check.id}" name="park_id[]">　
                                {/notpresent}
                                {present name="check.park_id"}
                                {$check.name}&nbsp;<input style="margin-left:0" type="checkbox" value="{$check.id}" name="park_id[]" checked>　
                                {/present}
                                {/volist}
                            </label>
                        </div>
                    </div>
                    <div class="form-group"><label class="col-sm-2 control-label">类型:</label>
                        <div class="col-sm-10">
                            {notpresent name="$list.type"}
                            <label class="checkbox-inline i-checks">
                                物业服务&nbsp;<input type="radio" value="0" name="type" checked>　
                                企业服务&nbsp;<input type="radio" value="1" name="type">
                            </label>
                            {/notpresent}
                            {present name="$list.type"}
                            {eq  name="$list.type"  value="0"}
                            <label class="checkbox-inline i-checks">
                                物业服务&nbsp;<input type="radio" value="0" name="type" checked>　
                                企业服务&nbsp;<input type="radio" value="1" name="type">
                            </label>　
                            {else/}
                            <label class="checkbox-inline i-checks">
                                物业服务&nbsp;<input type="radio" value="0" name="type">　
                                企业服务&nbsp;<input type="radio" value="1" name="type" checked>
                            </label>
                            {/eq}
                            {/present}
                        </div>
                    </div>

                    <div class="form-group"><label class="col-sm-2 control-label">状态:</label>
                        <div class="col-sm-10">

                            {notpresent name="$list.status"}
                            <label class="checkbox-inline i-checks">
                                启用&nbsp;<input type="radio" value="1" name="status" checked>　
                                禁用&nbsp;<input type="radio" value="0" name="status">
                            </label>
                            {/notpresent}
                            {present name="$list.status"}
                            {eq  name="$list.status"  value="1"}
                            <label class="checkbox-inline i-checks">
                                启用&nbsp;<input type="radio" value="1" name="status" checked>　
                                禁用&nbsp;<input type="radio" value="0" name="status">
                            </label>　
                            {else/}
                            <label class="checkbox-inline i-checks">
                                启用&nbsp;<input type="radio" value="1" name="status">　
                                禁用&nbsp;<input type="radio" value="0" name="status" checked>
                            </label>
                            {/eq}
                            {/present}
                        </div>
                    </div>

                    <div class="form-group"><label class="col-sm-2 control-label">支付宝:</label>
                        <div class="col-sm-10">
                            {notpresent name="$list.has_alipay"}
                            <label class="checkbox-inline i-checks">
                                支持&nbsp;<input type="radio" value="1" name="has_alipay" checked>　
                                不支持&nbsp;<input type="radio" value="2" name="has_alipay">
                            </label>
                            {/notpresent}
                            {present name="$list.has_alipay"}
                            {eq  name="$list.has_alipay"  value="2"}
                            <label class="checkbox-inline i-checks">
                                支持&nbsp;<input type="radio" value="1" name="has_alipay">　
                                不支持&nbsp;<input type="radio" value="2" name="has_alipay" checked>
                            </label>　
                            {else/}
                            <label class="checkbox-inline i-checks">
                                支持&nbsp;<input type="radio" value="1" name="has_alipay" checked>　
                                不支持&nbsp;<input type="radio" value="2" name="has_alipay">
                            </label>
                            {/eq}
                            {/present}
                        </div>
                    </div>

                    <div class="form-group"><label class="col-sm-2 control-label">银行卡:</label>
                        <div class="col-sm-10">
                            {notpresent name="$list.has_bank"}
                            <label class="checkbox-inline i-checks">
                                支持&nbsp;<input type="radio" value="1" name="has_bank" checked>　
                                不支持&nbsp;<input type="radio" value="2" name="has_bank">
                            </label>
                            {/notpresent}
                            {present name="$list.has_bank"}
                            {eq  name="$list.has_bank"  value="2"}
                            <label class="checkbox-inline i-checks">
                                支持&nbsp;<input type="radio" value="1" name="has_bank">　
                                不支持&nbsp;<input type="radio" value="2" name="has_bank" checked>
                            </label>　
                            {else/}
                            <label class="checkbox-inline i-checks">
                                支持&nbsp;<input type="radio" value="1" name="has_bank" checked>　
                                不支持&nbsp;<input type="radio" value="2" name="has_bank">
                            </label>
                            {/eq}
                            {/present}
                        </div>
                    </div>


                    <div class="mail-body text-right tooltip-demo">

                        <button url="{:Url('add')}{notempty name='$pageType'}?page_type=1{/notempty}" class="btn btn-sm btn-primary ajax-post" target-form="form-horizontal"
                                data-toggle="tooltip" data-placement="top" data-edit="content">
                            <i class="fa fa-reply"></i> 添加
                        </button>
                        <!--<button url="{:Url('draft')}" class="btn btn-white btn-sm ajax-post" data-toggle="tooltip" data-placement="top"-->
                        <!--target-form="form-horizontal" data-edit="content">-->
                        <!--<i class="fa fa-pencil"></i> 保存草稿-->
                        <!--</button>-->
                        <a href="{:Url('index')}" class="btn btn-white btn-sm" data-toggle="tooltip" data-placement="top"><i class="fa fa-times"></i> 关闭</a>
                    </div>

                    {empty name="list.name"}
                    <input type="hidden" name="id">
                    {/empty}
                    {notempty name="list.name"}
                    <input type="hidden" name="id" value="{$list.id}">
                    {/notempty}
                </div>
            </form>
        </div>
    </div>
</div>
{/block}

{block name="script"}
<script src="/static/summernote/summernote.min.js"></script>
<script src="/static/summernote/lang/summernote-zh-CN.js"></script>
<script src="/static/bootstrap-fileinput/js/fileinput.min.js"></script>
<script src="/static/bootstrap-fileinput/themes/fa/fa.js"></script>
<script src="/static/bootstrap-fileinput/js/locales/zh.js"></script>
<script src="/static/js/jQuery-imgBox/jquery.imgbox.js"></script>
<script>

    highlight_subnav("{:Url('CompanyApplication/index')}");

</script>
{/block}